package com.authine.cloudpivot.ext.enums.order;

/**
 * @author Kris
 * Created on 2019/12/24
 */
public enum OrderVendorStatusEnum {
    /**
     * 供应商订单状态
     */
    UpcomingPayment("未付款"),
    UpcomingConfirm("未接单"),
    UpcomingDelivery("未发货"),
    DoneDelivery("已发货"),
    Done("已完成"),
    Closed("已关闭"),
    ;

    public String des;

    OrderVendorStatusEnum(String des) {
        this.des = des;
    }

    public static OrderVendorStatusEnum switchNew(Integer status) {
        if (status.equals(1)) {
            return OrderVendorStatusEnum.UpcomingPayment;
        }

        if (status.equals(2)) {
            return OrderVendorStatusEnum.UpcomingConfirm;
        }

        if (status.equals(4)) {
            return OrderVendorStatusEnum.Closed;
        }

        if (status.equals(5)) {
            return OrderVendorStatusEnum.Done;
        }
        return null;
    }
}
